/*************************************************************
 * @file remote.c
 * @author MicroOrange
 * @brief 遥控器数据读取
 * @date 2022.4.14
 *************************************************************/

#ifndef __REMOTE_H
#define __REMOTE_H

enum {
    CHANNEL_TYPE_CONTINUOUS,
    CHANNEL_TYPE_DISCRETE_2,
    CHANNEL_TYPE_DISCRETE_3
};

enum {
    CAPSTATE_RISING,
    CAPSTATE_FALLING
};

typedef struct {
    int type;
    int source_min;
    int source_max;
    int target_min;
    int target_max;
    int source_value;
    float target_value;
} t_channel_feature;

void Remote_SetChannelValue(int channel_index, int value);
int Remote_GetChannelValue(int channel_index);
void Remote_Init();

#endif //COMMANDBOARD_REMOTE_H
